home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung / Power-Programmierung (Tewi)(1994).iso / magazine / msysjour / vol05 / 05 / swap / compat.h next >
C/C++ Source or Header  |  1990-09-01  |  1KB  |  55 lines

  1. #include <stdlib.h>
  2. #include <stdio.h>
  3. #include <string.h>
  4. #include <dos.h>
  5.  
  6. #if defined(__TURBOC__)
  7. #define TURBO  1
  8. #define MSC    0
  9. #else
  10. #define TURBO  0
  11. #define MSC    1
  12. #endif
  13.  
  14. #if (TURBO)
  15. #include <dir.h>
  16. #include <alloc.h>
  17. #include <sys\stat.h>
  18.  
  19. #define OS_MAJOR  (_version & 0xff)
  20.  
  21. #endif
  22.  
  23. #if (MSC)
  24. #include <malloc.h>
  25. #include <direct.h>
  26. #include <sys\types.h>
  27. #include <sys\stat.h>
  28.  
  29. #define fnsplit   _splitpath
  30. #define fnmerge   _makepath
  31.  
  32. #define MAXPATH   _MAX_PATH
  33. #define MAXDRIVE  _MAX_DRIVE
  34. #define MAXDIR    _MAX_DIR
  35. #define MAXFILE   _MAX_FNAME
  36. #define MAXEXT    _MAX_EXT
  37.  
  38. #define FA_RDONLY _A_RDONLY
  39. #define FA_HIDDEN _A_HIDDEN
  40. #define FA_SYSTEM _A_SYSTEM
  41. #define FA_ARCH   _A_ARCH
  42.  
  43. #define findfirst(a,b,c) _dos_findfirst(a,c,b)
  44. #define ffblk find_t
  45.  
  46. #define OS_MAJOR  _osmajor
  47.  
  48. #define farmalloc(x)    ((void far *)halloc(x,1))
  49. #define farfree(x)      hfree((void huge *)x)
  50.  
  51. #define stpcpy(d,s)     (strcpy (d, s), d + strlen (s))
  52.  
  53. #endif
  54.  
  55.